﻿{% extends 'base.html' %}     # 继承母版内容


<!-- 填充页面内容 -->
{% block body-content %}
    <div class="container">
        <p></p>
        <table class="table table-bordered form-inline" align="center">
            <caption>研发部目前入职员工信息列表</caption>
            <thead>
            <tr>
                <th>序号</th>
                <th>工号</th>
                <th>姓名</th>
                <th>报销系统编码</th>
                <th>归属地</th>
                <th>职务</th>
                <th>属性</th>
                <th>级别</th>
                <th>联系电话</th>
                <th>工作邮箱</th>
                <th>分配IP</th>
                <th>上网类型</th>
                <th>备注</th>
            </tr>
            </thead>
            <tbody>
            {% for d in worker_list %}
                <!-- 显示不同背景 -->
                <tr {% if forloop.counter|divisibleby:"2" %} class="active"
                {% else %} class="success"  {% endif %}  >
                    <td>{{ d.id }}</td>
                    <td>{{ d.worker_number }}</td>
                    <td>{{ d.worker_name }}</td>
                    <td>{{ d.worker_re_number }}</td>
                    <td>{{ d.worker_address_number }}</td>
                    <td>{{ d.worker_title_number }}</td>
                    <td>{{ d.worker_property_number }}</td>
                    <td>{{ d.worker_class_number }}</td>
                    <td>{{ d.worker_telnumber }}</td>
                    <td>{{ d.worker_email }}</td>
                    <td>{{ d.worker_ip }}</td>
                    <td>{{ d.worker_net_type }}</td>
                    <td>{{ d.worker_remark }}</td>
                </tr>
            {% endfor %}
            </tbody>

        </table>
        <!-- 页面导航栏 -->
        <p>
            {% if worker_list.has_previous %}
                <a href="?page={{ worker_list.previous_page_number }}">上一页</a>
            {% endif %}
            {# data.paginator.number_pages 返回总页数 #}
            第{{ worker_list.number }}页 | 共{{ worker_list.paginator.num_pages }}页
            {% if worker_list.has_next %}
                <a href="?page={{ worker_list.next_page_number }}">下一页</a>
            {% endif %}
        </p>

    </div>

{% endblock %}
